Repository navigation
fix(uv): fail clearly when no conflict variant is selected - #373
Merged
Merged
Conversation
Emit a pycross_no_variant_selected fallback target per conflict set without a default variant and wire it as the //conditions:default fallback in thin_package_repo select() expressions instead of no_match_error or _empty_library, restoring the clear 'Set one of: ...' analysis failure when no conflict variant flag is set.
…ants Add an explicit _unselected_<set> config_setting matching FeatureFlagInfo(value = "") and wire it into thin_package_repo select() expressions so that selected variants whose fork does not match the target platform still fall through to //conditions:default (no_match_error / _empty_library) rather than failing with the unselected-variant error.
Make pycross_no_variant_selected respect //pycross/settings:unavailable_package_mode so analysis-only consumers (cquery/aquery/aspects) succeed under fail_at_execution while builds and tests fail at execution with the same 'Set one of' message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pycross_no_variant_selectedrule inpycross/private/variant_resolver.bzl(providingDefaultInfoandPyInfo) that fails analysis with a user-actionable message._no_variant_<set>in_lock/BUILD.bazelfor each conflict set without a default variant, listing the--@<member>//_variants:<qname>flags to choose from.@<ws>//_lock:_no_variant_<set>as the//conditions:defaultfallback inthin_package_repo.bzl(_target_selectand_emit_maybe_alias) for unselected conflict variant sets while preservingno_match_error/_empty_libraryfor fork-only (res_*) selects and default variant behavior.tests/unit/test_thin_package_repo.bzland assertSet one oferror output for both//:test_variant_aand//...intests/e2e/uv_conflicts/run.sh.